package com.spddr.pmos.repos;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.spddr.pmos.jpa.CustomerRisk;
import com.spddr.pmos.jpa.CustomerRiskId;

public interface CustomerRiskRepos extends JpaRepository<CustomerRisk, CustomerRiskId> {
	List<CustomerRisk> findByIdCustomer(long customer);

	@Query("DELETE FROM CustomerRisk WHERE id.customer=?")
	void deleteByCustomer(long customer);
}
